package com.gb.demand.common.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 发票明细表
 * </p>
 *
 * @author shenzhiwen
 * @since 2020-03-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("wemall_sp_client_billingapplyinfo")
@ApiModel(value="SpClientBillingapplyinfo对象", description="发票明细表")
public class SpClientBillingapplyinfo extends Model<SpClientBillingapplyinfo> implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("addTime")
    private Date addTime;

    @TableField("deleteStatus")
    private Boolean deleteStatus;

    @ApiModelProperty(value = "关联的发票是哪一个 表wemall_sp_client_billingapply的主键id")
    private Long sp_c_billingapply_id;

    @ApiModelProperty(value = "订单id 关联表wemall_orderform的主键id ")
    private Long of_id;

    @ApiModelProperty(value = "订单的时间，wemall_orderform表的addTime字段")
    @TableField("of_addTime")
    private Date of_addTime;

    @ApiModelProperty(value = "商品编码，这里关联表wemall_goods表的主键id")
    private Long goods_id;

    @ApiModelProperty(value = "商品名称")
    private String goods_name;

    @ApiModelProperty(value = "开票名称，默认商品名称 可以修改")
    private String billing_goods_name;

    @ApiModelProperty(value = "开票规格")
    private String billing_specification;

    @ApiModelProperty(value = "商品财务编码")
    private String goods_financial_code;

    @ApiModelProperty(value = "商品数量")
    private Integer goods_count;

    @ApiModelProperty(value = "商品单价")
    private BigDecimal goods_price;

    @ApiModelProperty(value = "商品在所属店铺中的自定义分类主键id")
    private Long goods_top_ugc_id;

    @ApiModelProperty(value = "税率 默认是商城设置的taxrate=0.13 ，但可以修改")
    private BigDecimal taxrate;

    @ApiModelProperty(value = "标准折扣率  （根据商品的顶级分类,当前服务商的member主键id  找到ServiceProvidersDiscount对象拿到折扣率 ")
    private BigDecimal spd;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "明细总金额 这里的 count*price")
    private BigDecimal info_totalprice;

    @ApiModelProperty(value = "关联这条明细是哪一个goodscart来的")
    private Long goodscart_id;

    @ApiModelProperty(value = "关联服务商自己开票给广博的发票的id 表：wemall_sp_sp_billingapply")
    private Long sp_sp_billingapply_id;

    @ApiModelProperty(value = "折扣率 不同于spd(标准折扣率)，但默认是spd的值，并可以修改")
    private BigDecimal sp_spd;

    @ApiModelProperty(value = "服务商开票金额，等于:折扣率*订单金额 （字段：sp_spd*info_totalprice）")
    private BigDecimal sp_info_totalprice;

    @ApiModelProperty(value = "服务商是否开过这个发票明细的发票 开过:1 ；没开过:0")
    private Boolean sp_hasbilling;

    @ApiModelProperty(value = "商品计量单位")
    private String goods_unit;

    @ApiModelProperty(value = "无税金额")
    private BigDecimal wsje;

    @ApiModelProperty(value = "税额")
    private BigDecimal se;
}
